<!-- include tpl=head_lay -->
<div class="layui-card">
	<div class="layui-card-header ">
		<!-- if $navlist -->
			<a href="{url ctrl=cate/}">{lang根分类}</a>
			<!-- loop from=$navlist key=$key value=$value id=$tmpid -->
			/ <a href="{url ctrl=cate func=index parent_id=$value.id/}">
				{$value.title}
			</a>
			<!-- /loop -->
		<!-- else -->
		{lang根分类}
		<!-- /if -->
		<div class="fr">
			<!-- if $rs -->
			<div class="layui-btn-group">
				<button class="layui-btn layui-btn-sm" onclick="$.win('{lang添加子分类}_#{$value.id}','{url ctrl=cate func=set parent_id=$rs.id/}')">
					<i class="layui-icon">&#xe608;</i> {lang添加子分类}
				</button>
				<button class="layui-btn layui-btn-sm" onclick="$.win('{lang批量添加}_#{$value.id}','{url ctrl=cate func=set_more parent_id=$rs.id/}')">
					<i class="layui-icon">&#xe608;</i> {lang批量添加}
				</button>
			</div>
			<!-- else -->
			<button class="layui-btn layui-btn-sm" onclick="$.win('{lang添加根分类}','{url ctrl=cate func=set/}')">
				<i class="layui-icon">&#xe608;</i> {lang添加根分类}
			</button>
			<!-- /if -->
		</div>
	</div>
	<div class="layui-card-body">
		<table class="layui-table" lay-size="sm">
			<thead>
			<tr>
				<!-- if $rs -->
				<th width="20">&nbsp;</th>
				<!-- /if -->
				<th width="40">ID</th>
				<th width="20"></th>
				<th>{lang分类名称}</th>
				<th>{lang标识}</th>
				<th>{lang子类数量}</th>
				<th width="80">{lang排序}</th>
				<th width="210">{lang操作}</th>
			</tr>
			</thead>
			<tbody>
			<!-- loop from=$rslist key=$key value=$value -->
			<tr>
				<!-- if $rs -->
				<td><input type="checkbox" name="ids[]" id="c_{$value.id}" value="{$value.id}" /></td>
				<!-- /if -->
				<td>{$value.id}</td>
				<td>
					<span id="status_{$value.id}" onclick="$.admin_cate.status({$value.id})" class="status{$value.status}" value="{$value.status}"></span>
				</td>
				<td style="{$value.style}"><label for="c_{$value.id}">{$value.title}</label></td>
				<td>{$value.identifier}</td>
				<td id="total_{$value.id}"><!-- if $value.total -->{$value.total}<!-- else --><span class="red">0</span><!-- /if --></td>
				<td><input type="text" id="taxis_{$value.id}" class="layui-input" value="{$value.taxis}" tabindex="{$tab_i}" data-old="{$value.taxis}" onblur="$.admin_cate.taxis(this,'{$value.id}')" /></td>
				<td>
					<div class="layui-btn-group">
						<!-- if $popedom.add -->
						<input type="button" value="{lang子分类}" onclick="$.phpok.go('{url ctrl=cate func=index parent_id=$value.id/}')" class="layui-btn layui-btn-sm layui-btn-normal" />
						<!-- /if -->
						<!-- if $popedom.modify -->
						<input type="button" value="{lang修改}" onclick="$.win('{lang修改分类}_#{$value.id}','{url ctrl=cate func=set id=$value.id/}')" class="layui-btn layui-btn-sm" />
						<!-- /if -->
						<!-- if $popedom.delete -->
						<input type="button" value="{lang删除}" onclick="$.admin_cate.del('{$value.id}')" class="layui-btn layui-btn-sm layui-btn-danger" />
						<!-- /if -->
					</div>
				</td>
			</tr>
			<!-- /loop -->
			</tbody>
		</table>
		<!-- if $rs -->
		<ul class="layout">
			<li>
				<div class="layui-btn-group">
					<input type="button" value="{lang全选}" class="layui-btn layui-btn-primary layui-btn-sm" onclick="$.checkbox.all()" />
					<input type="button" value="{lang全不选}" class="layui-btn layui-btn-primary layui-btn-sm" onclick="$.checkbox.none()" />
					<input type="button" value="{lang反选}" class="layui-btn layui-btn-primary layui-btn-sm" onclick="$.checkbox.anti()" />
				</div>
			</li>
			<li id="plugin_button">
				<div class="layui-btn-group">
					<input type="button" value="{lang启用}" class="layui-btn layui-btn-sm" onclick="$.admin_cate.pl_status(1)" />
					<input type="button" value="{lang禁用}" class="layui-btn layui-btn-warm layui-btn-sm" onclick="$.admin_cate.pl_status(0)" />
					<input type="button" value="{lang删除}" class="layui-btn layui-btn-danger layui-btn-sm" onclick="$.admin_cate.pl_delete(0)" />
				</div>
			</li>
		</ul>
		<!-- /if -->
	</div>

</div>
<!-- include tpl=foot_lay -->